package com.spring.boot.service.impl;

import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.spring.boot.dao.DaoSupport;
import com.spring.boot.service.UserService;

@Service
public class UserServiceImpl implements UserService{
	
	@Resource(name="daoSupport")
	DaoSupport dao;
	
	@Override
	public Integer save(Object obj) throws Exception {
		return dao.save("MybatisUserMapper.save", obj);
	}

	@Override
	public Object queryOfObject(Object obj) throws Exception {
		return dao.findForObject("MybatisUserMapper.findForObject", obj);
	}

	@Override
	public Integer updateOfName(Object obj) throws Exception{
		return dao.update("MybatisUserMapper.update", obj);
	}

	@Override
	public Integer delete(Object obj) throws Exception{
		return dao.delete("MybatisUserMapper.delete", obj);
	}

	@Override
	public List<?> queryAll(Object obj) throws Exception {
		return (List<?>) dao.findForList("MybatisUserMapper.findForAll", obj);
	}

}
